
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>dbm_utilities.mix_gas_for_gor &#8212; Texas A&amp;M Oil spill / Outfall Calculator 2.1.0 documentation</title>
    <link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    <script id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
    <script src="../../_static/jquery.js"></script>
    <script src="../../_static/underscore.js"></script>
    <script src="../../_static/doctools.js"></script>
    <script src="../../_static/language_data.js"></script>
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
    <link rel="next" title="dbm_utilities.natural_gas" href="dbm_utilities.natural_gas.html" />
    <link rel="prev" title="dbm_utilities.format_dbm_data" href="dbm_utilities.format_dbm_data.html" />
   
  <link rel="stylesheet" href="../../_static/custom.css" type="text/css" />
  
  
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

  </head><body>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          

          <div class="body" role="main">
            
  <div class="section" id="dbm-utilities-mix-gas-for-gor">
<h1>dbm_utilities.mix_gas_for_gor<a class="headerlink" href="#dbm-utilities-mix-gas-for-gor" title="Permalink to this headline">¶</a></h1>
<dl class="function">
<dt id="dbm_utilities.mix_gas_for_gor">
<code class="sig-prename descclassname">dbm_utilities.</code><code class="sig-name descname">mix_gas_for_gor</code><span class="sig-paren">(</span><em class="sig-param">dead_composition</em>, <em class="sig-param">dead_mass_frac</em>, <em class="sig-param">user_data</em>, <em class="sig-param">delta</em>, <em class="sig-param">gor</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/dbm_utilities.html#mix_gas_for_gor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#dbm_utilities.mix_gas_for_gor" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a live oil with a given gas to oil ratio (GOR)</p>
<p>Mix natural gas into a dead oil composition until a live oil with a given
gas to oil ratio (GOR) is achieved.  This function adds gas compounds to 
the oil mixture and adjusts the mass fractions of the whole mixture until
the given GOR results from an equilibrium calculation at standard 
conditions (15 deg C and atmospheric pressure).  This method returns the
new chemical composition list, mass fractions, and binary interaction
coefficients.  The user_data describing the dead oil components is not
changed.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>dead_composition</strong><span class="classifier">list</span></dt><dd><p>List of strings containing the names of the oil components in the 
dead oil</p>
</dd>
<dt><strong>dead_mass_frac</strong><span class="classifier">np.array</span></dt><dd><p>An array of mass fractions for each of the compounds in the dead oil 
composition (kg)</p>
</dd>
<dt><strong>user_data</strong><span class="classifier">dict</span></dt><dd><p>A dictionary of chemical property data in the format expected by 
the tamoc.dbm FluidMixture and FluidParticle module objects.</p>
</dd>
<dt><strong>delta</strong><span class="classifier">np.array (len M, len M)</span></dt><dd><p>Array of binary interaction coefficients</p>
</dd>
<dt><strong>gor</strong><span class="classifier">float</span></dt><dd><p>Gas to oil ratio desired for a given live-oil release.  We add light
gas compounds to the dead oil composition and iterate the gas 
fractions until the GOR at standard conditions is returned.  Here, 
gor has the standard units ft^3 gas per stock barrel of oil at 
surface conditions.  The gas composition is specified in the 
function natural_gas().</p>
</dd>
</dl>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><dl class="simple">
<dt><strong>composition</strong><span class="classifier">list</span></dt><dd><p>List of strings containing the names of all oil components in the 
live oil.</p>
</dd>
<dt><strong>mass_frac</strong><span class="classifier">np.array</span></dt><dd><p>An array of mass fractions for all compounds in the live oil (kg/kg).</p>
</dd>
<dt><strong>delta</strong><span class="classifier">np.array (len M, len M)</span></dt><dd><p>An updated array of binary interaction coefficients that includes the
interactions among all compounds in composition.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

</div>


          </div>
          
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../../index.html">Texas A&M Oil spill / Outfall Calculator</a></h1>








<h3>Navigation</h3>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="../../user_manual.html">TAMOC User Manual</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../unit_tests.html">Unit Tests</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../glossary.html">Glossary</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../bugs.html">Reporting Bugs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../readme.html">Read Me File</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../release.html">Release Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../license.html">License</a></li>
</ul>

<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="../../index.html">Documentation overview</a><ul>
  <li><a href="../../user_manual.html">TAMOC User Manual</a><ul>
  <li><a href="../../modules/dbm_utils.html">Overview of DBM Utilities Module</a><ul>
      <li>Previous: <a href="dbm_utilities.format_dbm_data.html" title="previous chapter">dbm_utilities.format_dbm_data</a></li>
      <li>Next: <a href="dbm_utilities.natural_gas.html" title="next chapter">dbm_utilities.natural_gas</a></li>
  </ul></li>
  </ul></li>
  </ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" />
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>$('#searchbox').show(0);</script>








        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy;2020, Scott A. Socolofsky.
      
      |
      Powered by <a href="http://sphinx-doc.org/">Sphinx 2.4.4</a>
      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
      
      |
      <a href="../../_sources/autodoc/dbm_utilities/dbm_utilities.mix_gas_for_gor.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>